#!/usr/bin/python

from crypticle import Crypticle 


# usage example
key = Crypticle.generate_key_string()
data = {"dict": "full", "of": "secrets", "nome":"serafino", "giacca":"marrone"}
crypt = Crypticle(key)
safe = crypt.dumps(data)

mess_encritp = crypt.encrypt(safe)
mess_decript = crypt.decrypt(mess_encritp)

mess_decriptt = crypt.loads(mess_decript)

assert data == crypt.loads(safe)

print "encrypted data:"
print mess_encritp.encode("base64")

print mess_decriptt 


